package com.footprint.main;

import org.springframework.beans.BeansException;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainServer {
	private static  ClassPathXmlApplicationContext context;

    public MainServer() {
    	initContext();			/** 初始化Spring设置 **/
    }

    /** 初始化Spring设置 **/
	private void initContext() {
		context = new ClassPathXmlApplicationContext(new String[] { "/applicationContext.xml", "/applicationContext_beans.xml",
				"/applicationContext_quartz.xml" });
	}
	
	public static Object getObject(String beanId)throws BeansException{
    	Object obj = null;
        obj = context.getBean(beanId);
        return obj;
	}
	
	public static void main(String args[]) {
		new MainServer();
	}
}
